﻿@model BlackBox.ActiveGame

@{
    ViewBag.Title = "Play";
}

<div id="play-page">
    @if(Model != null)
    {
        <h3>Play</h3>

        <div id ="game">
    
            <div>
                @if(Model.owner == User.Identity.Name)
                {
                    <input type="button" id="StartGame" value="Start" />
                    <input type="text" id="invite-game" name="@Model.id" />
                    <input type="button" id="InvitetoGame"value="Invite" />
                    <span class="game-invite-sent"></span>
                }
                <a href="/Home/Main">LeaveGame</a>
            </div>

            <div class="game-box">

            </div>
            <div id="game-chat">
                <div class="log">

                </div>
                <div class="messages">

                </div>
                <input type="text" class="messagestext" />
                <input type="submit" class="send" value="Send"/>
            </div>
        <div class="alerts">

        </div>
    </div>
   }
</div>

@if(Model != null)
{
    if(Model.gameid == 1)
    {
        <script type="text/javascript" src="~/Scripts/GameScript-1.js"></script>
    }

    if(Model.gameid == 5)
    {
        <script type="text/javascript" src="~/Scripts/GameScript-2.js"></script>
    }
}
